//
//  CYHomeLabelTableViewCell.m
//  cyydt
//
//  Created by chu on 2019/1/16.
//  Copyright © 2019 chu. All rights reserved.
//

#import "CYHomeLabelTableViewCell.h"
#import "CYQuestionAndAnswerViewController.h"//精品问答
#import "CYMyFollowViewController.h"
#import "CYMeiZhouYiJianViewController.h"
#import "CYJingCaiHuoDongViewController.h"

@implementation CYHomeLabelTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (IBAction)clickAction:(UIButton *)sender {
    switch (sender.tag) {
        case 0:
            {
                if ([YLUserInfo isLogIn]) {
                    //我的关注
                    CYMyFollowViewController *follow = [[CYMyFollowViewController alloc] init];
                    [[AppDelegate sharedAppDelegate] pushViewController:follow];
                }else{
                    LoginViewController *login = [[LoginViewController alloc] init];
                    [[AppDelegate sharedAppDelegate] pushViewController:login];
                }
                
            }
            break;
        case 1:
            {
                //精品问答
                CYQuestionAndAnswerViewController *answer = [[CYQuestionAndAnswerViewController alloc] init];
                [[AppDelegate sharedAppDelegate] pushViewController:answer];
            }
            break;
        case 2:
            {
                //每周一荐
                CYMeiZhouYiJianViewController *yijian = [[CYMeiZhouYiJianViewController alloc] init];
                [[AppDelegate sharedAppDelegate] pushViewController:yijian];
            }
            break;
        case 3:
            {
                //精彩活动
                CYJingCaiHuoDongViewController *huodong = [[CYJingCaiHuoDongViewController alloc] init];
                [[AppDelegate sharedAppDelegate] pushViewController:huodong];
            }
            break;
            
        default:
            break;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
